<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateApprovalListTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('approval_list', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('project_id')->default(0)->comment('项目id');
            $table->text('content')->comment('内容');
            $table->integer('apply_type')->default(0)->comment('类型');
            $table->string('apply_reason')->default('')->comment('理由');
            $table->integer('user_id')->default(0)->comment('申请用户id');
            $table->integer('grid_id')->default(0)->comment('网格id');
            $table->integer('apply_status')->default(0)->comment('0申请中1通过2拒绝3审批中');
            $table->integer('step')->default(1)->comment('步骤:1自增');
            $table->integer('set_id')->default(0)->comment('使用配置id');
            $table->timestamps();
            $table->softDeletes();
        });
        \Illuminate\Support\Facades\DB::statement("ALTER TABLE `approval_list` comment '审批列表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('approval_list');
    }
}
